<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="Stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/admin.css" />
<style type="text/css">
ul.errorMessage, ul.errorMessage li {
	margin: 0;
	padding: 0;
	list-style-type: none;
	color: red;
	display: inline;
}
</style>		
</head>
<body>
	<!-- 区域的编辑 -->
	<c:if test="${param.sort==1}">
		<div class="content right">
			<form action="save1" method="post">
				<input type="hidden" name="id" value="${district==null?0:district.id}" />
				<table border="1">
					<caption>
						<h4> <c:if test="${district==null}">添加</c:if>
						<c:if test="${district !=null}">编辑</c:if>
						区域 
						</h4>
					</caption>
					<tr>
						<td>区域名：</td>
						<td><input type="text" name="name" value="${district.name}" /></td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td><input type="submit" value="保存" /> <input type="reset"
							value="取消" /></td>
					</tr>
				</table>
			</form>
		</div>
	</c:if>
	<!-- 街道的编辑 -->
	<c:if test="${param.sort==2}">
		<div class="content right">
			<form action="save2" method="post">
				<input type="hidden" name="id" value="${street==null?0:street.id}" />
				<table border="1">
					<caption>
						<h4>
						<c:if test="${street==null}">添加</c:if>
						<c:if test="${street !=null}">编辑</c:if>
						
						街道:</h4>
					</caption>
					<tr>
						<td>街道名：</td>
						<td><input type="text" name="name" value="${street.name}" /></td>
					</tr>
					<tr>
						<td>所属区域名</td>
						<td><select name="districtId">
								<option value="0">所属区域名</option>
								<c:forEach var="d" items="${districts}">
									<option value="${d.id}"
										<c:if test="${d.id==street.districtId}"> selected="selected"</c:if>>${d.name}</option>
								</c:forEach>
						</select></td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td><input type="submit" value="保存" /> <input type="reset"
							value="取消" /></td>
					</tr>
				</table>
			</form>
		</div>
	</c:if>
	
	
	<!-- 房型的编辑 -->
	<c:if test="${param.sort==3}">
		<div class="content right">
			<form action="save3" method="post">
				<input type="hidden" name="id" value="${type==null?0:type.id}" />
				<table border="1">
					<caption>
						<h4>
						<c:if test="${street==null}">添加</c:if>
						<c:if test="${street !=null}">编辑</c:if>
						房型</h4>
					</caption>
					<tr>
						<td>房型名：</td>
						<td><input type="text" name="name" value="${type.name}" /></td>
					</tr>					
					<tr>
						<td>&nbsp;</td>
						<td><input type="submit" value="保存" /> <input type="reset"
							value="取消" /></td>
					</tr>
				</table>
			</form>
		</div>
	</c:if>
	
	
	



</body>